<template>
  <div>
    <bread></bread>
    <el-card>
      <el-button>添加</el-button>

      <el-table :data="getCategories" style="width: 100%">
        <el-table-column type="index" width="180"></el-table-column>

        <el-table-column prop="cat_name" label="分类名称" width="180"></el-table-column>

        <el-table-column prop="cat_deleted" label="是否有效">
            
        </el-table-column>

        <el-table-column prop="cat_level" label="分类当前层数"></el-table-column>
      </el-table>
    </el-card>
  </div>
</template>
<script>
import bread from "../Bread.vue";
export default {
  components: {
    bread
  },
  data() {
    return {
      getCategories: []
    };
  },
  created() {
    this.huoCategories();
  },
  methods: {
    async huoCategories() {
      let { data: res } = await this.$http.get("categories");
      this.getCategories = res.data;
    }
  }
};
</script>
<style lang="scss" scoped>
</style>